<script>
    new Promise((resolve, reject) => {
        console.log('promise')
        setTimeout(() => resolve('first'), 3000);

    })
        .then(success => {
            console.log(success)
            return new Promise((resolve, reject) => {
                setTimeout(() => resolve('second'), 3000);
            })
        })
        .then(success => {
            console.log(success)
        })
        .catch(error => {
            console.log(error)
        })
    console.log(4635)
</script>